﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="ProfileView.aspx.vb" Inherits="customtech.ProfileView" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ListView ID="ListView1" runat="server" DataKeyNames="userName" 
        DataSourceID="SqlDataSource1" GroupItemCount="3" style="width: 100%">
        <AlternatingItemTemplate>
            <td runat="server" style="">
                
                <a href='userProfile.aspx?UserName=<%# Eval("UserName") %>'><img src='<%# Eval("UserPic") %>' style="width:100px;height:100px" /></a>
                <br />
                <a href='userProfile.aspx?UserName=<%# Eval("UserName") %>'><asp:Label ID="Label2" runat="server" Text='<%# Eval("UserName") %>' /></a>
                <br />
            </td>
        </AlternatingItemTemplate>
        <EditItemTemplate>
            <td runat="server" style="">
                <asp:Label ID="FirstNameLabel" runat="server" Text='<%# Eval("FirstName") %>' /> &nbsp;
                <asp:Label ID="LastNameLabel" runat="server" Text='<%# Eval("LastName") %>' />
                <br />UserPic:
                <img src='<%# Eval("UserPic") %>' style="width:100px;height:100px" />
                <br />Gender:
                <asp:Label ID="GenderLabel" runat="server" Text='<%# Eval("Gender") %>' />
                <br />DoB:
                <asp:Label ID="DoBLabel" runat="server" Text='<%# Eval("DoB") %>' />
                <br />PreferredOS:
                <asp:Label ID="PreferredOSLabel" runat="server" 
                    Text='<%# Eval("PreferredOS") %>' />
                <br />PreferredCPU:
                <asp:Label ID="PreferredCPULabel" runat="server" 
                    Text='<%# Eval("PreferredCPU") %>' />
                <br />PreferredScreenResolution:
                <asp:Label ID="PreferredScreenResolutionLabel" runat="server" 
                    Text='<%# Eval("PreferredScreenResolution") %>' />
                <br />DateRegistered:
                <asp:Label ID="DateRegisteredLabel" runat="server" 
                    Text='<%# Eval("DateRegistered") %>' />
                <br />
            </td>
        </EditItemTemplate>
        <EmptyDataTemplate>
            <table runat="server" style="width: 100%">
                <tr>
                    <td>
                        No data was returned.</td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <EmptyItemTemplate>
<td runat="server" />
        </EmptyItemTemplate>
        <GroupTemplate>
            <tr ID="itemPlaceholderContainer" runat="server">
                <td ID="itemPlaceholder" runat="server">
                </td>
            </tr>
        </GroupTemplate>
        <InsertItemTemplate>
            <td runat="server" style="">
                userName:
                <asp:TextBox ID="userNameTextBox" runat="server" 
                    Text='<%# Bind("userName") %>' />
                <br />FirstName:
                <asp:TextBox ID="FirstNameTextBox" runat="server" 
                    Text='<%# Bind("FirstName") %>' />
                <br />LastName:
                <asp:TextBox ID="LastNameTextBox" runat="server" 
                    Text='<%# Bind("LastName") %>' />
                <br />UserPic:
                <asp:TextBox ID="UserPicTextBox" runat="server" Text='<%# Bind("UserPic") %>' />
                <br />Gender:
                <asp:TextBox ID="GenderTextBox" runat="server" Text='<%# Bind("Gender") %>' />
                <br />DoB:
                <asp:TextBox ID="DoBTextBox" runat="server" Text='<%# Bind("DoB") %>' />
                <br />PreferredOS:
                <asp:TextBox ID="PreferredOSTextBox" runat="server" 
                    Text='<%# Bind("PreferredOS") %>' />
                <br />PreferredCPU:
                <asp:TextBox ID="PreferredCPUTextBox" runat="server" 
                    Text='<%# Bind("PreferredCPU") %>' />
                <br />PreferredScreenResolution:
                <asp:TextBox ID="PreferredScreenResolutionTextBox" runat="server" 
                    Text='<%# Bind("PreferredScreenResolution") %>' />
                <br />DateRegistered:
                <asp:TextBox ID="DateRegisteredTextBox" runat="server" 
                    Text='<%# Bind("DateRegistered") %>' />
                <br />
                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                    Text="Insert" />
                <br />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                    Text="Clear" />
                <br />
            </td>
        </InsertItemTemplate>
        <ItemTemplate>
            <td runat="server" style="">
                 <a href='userProfile.aspx?UserName=<%# Eval("UserName") %>'><img src='<%# Eval("UserPic") %>' style="width:100px;height:100px" /></a>
                <br />
                <a href='userProfile.aspx?UserName=<%# Eval("UserName") %>'><asp:Label ID="Label2" runat="server" Text='<%# Eval("UserName") %>' /></a>
                <br />
            </td>
        </ItemTemplate>
        <LayoutTemplate>
            <table runat="server">
                <tr runat="server">
                    <td runat="server">
                        <table ID="groupPlaceholderContainer" runat="server" border="0" style="">
                            <tr ID="groupPlaceholder" runat="server">
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr runat="server">
                    <td runat="server" style="">
                        <asp:DataPager ID="DataPager1" runat="server" PageSize="12">
                            <Fields>
                                <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                    ShowLastPageButton="True" />
                            </Fields>
                        </asp:DataPager>
                    </td>
                </tr>
            </table>
        </LayoutTemplate>
        <SelectedItemTemplate>
            <td runat="server" style="">
                userName:
                <asp:Label ID="userNameLabel" runat="server" Text='<%# Eval("userName") %>' />
                <br />FirstName:
                <asp:Label ID="FirstNameLabel" runat="server" Text='<%# Eval("FirstName") %>' />
                <br />LastName:
                <asp:Label ID="LastNameLabel" runat="server" Text='<%# Eval("LastName") %>' />
                <br />UserPic:
                <asp:Label ID="UserPicLabel" runat="server" Text='<%# Eval("UserPic") %>' />
                <br />Gender:
                <asp:Label ID="GenderLabel" runat="server" Text='<%# Eval("Gender") %>' />
                <br />DoB:
                <asp:Label ID="DoBLabel" runat="server" Text='<%# Eval("DoB") %>' />
                <br />PreferredOS:
                <asp:Label ID="PreferredOSLabel" runat="server" 
                    Text='<%# Eval("PreferredOS") %>' />
                <br />PreferredCPU:
                <asp:Label ID="PreferredCPULabel" runat="server" 
                    Text='<%# Eval("PreferredCPU") %>' />
                <br />PreferredScreenResolution:
                <asp:Label ID="PreferredScreenResolutionLabel" runat="server" 
                    Text='<%# Eval("PreferredScreenResolution") %>' />
                <br />DateRegistered:
                <asp:Label ID="DateRegisteredLabel" runat="server" 
                    Text='<%# Eval("DateRegistered") %>' />
                <br />
            </td>
        </SelectedItemTemplate>
    </asp:ListView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:connstr %>" 
        ProviderName="<%$ ConnectionStrings:connstr.ProviderName %>" 
        
        SelectCommand="SELECT [UserName], [FirstName], [LastName], [Gender], [DoB], [PreferredOS], [PreferredCPU], [PreferredScreenResolution], [DateRegistered], [UserPic] FROM [profileview]">
    </asp:SqlDataSource>
</asp:Content>
